/**
 * 
 */
package weibo4j.examples.statuses;

import weibo4j.Status;
import weibo4j.Weibo;

/**
 * @author sina
 *
 */
public class UpdateStatus {

	/**
	 * 发布一条微博信息 
	 * @param args
	 */
	public static void main(String[] args) {
		String str1 = "950b6c1a4015b9d99c6e88a2dcc2b20e";
		String str2 = "275b293ea99daa86f8f5000753877fd2";
		System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
    	System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
        try {
        	Weibo weibo = new Weibo();
			weibo.setToken(str1, str2);
			for (int i=0; i < 100; i++) {
				Status status = weibo.updateStatus("夜深了，人睡了。" + "Test date index:" + i);
				
			}
        	//System.out.println(status.getId() + " : "+ status.getText()+"  "+status.getCreatedAt());
        	
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
